package com.yingside.guess;

public class Computer {
    String computerName;

    public int showComputerFist(){
        //电脑的随机出拳
        //随机值 公式：Math.random() * （max - min + 1) + min
        int computerFist = (int)(Math.random() * 3) + 1;

        switch(computerFist){
            case 1:
                System.out.println("电脑出拳：剪刀" );
                break;
            case 2:
                System.out.println("电脑出拳：石头" );
                break;
            case 3:
                System.out.println("电脑出拳：布" );
                break;
        }
        return computerFist;
    }
}
